package org.example.compent;

import com.alibaba.fastjson.JSON;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.yomahub.liteflow.slot.DefaultContext;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@LiteflowComponent("b")
public class BCmp extends NodeComponent {

	@Override
	public void process() {
		DefaultContext contextBean = this.getContextBean(DefaultContext.class);
		log.info("a节点执行结果{}", contextBean.getData("a").toString());
		log.info("--------------B结点-----------");
		contextBean.setData("b", "b结点执行成功");
		log.info("返回结果:{}", JSON.toJSON(contextBean));
	}
}
